import os
directory="【Path to c file】"
# 列出目录下所有文件和文件夹
files = os.listdir(directory)

# 生成完整的文件路径列表
full_paths = [os.path.join(directory, file) for file in files]
for p in full_paths:
    if p[-2:]==".c":
        try:
            os.system("python3 main.py "+p)
        except:
            pass
